<?php
include('./mysql.php');

$major_id = $_GET['id'];

$result = $conn->query('SELECT * FROM curriculum WHERE major_id = ' . $major_id);

$arr = [];
while($row = $result->fetch_assoc()) {
    $arr[] = $row;
}

echo json_encode(["list"=>$arr]);